import numpy as np
import cv2 as cv
img = cv.imread('E:/code/study/python/opencv/code/3.png', 1)
cv.imshow('image', img)
cv.waitKey(0)  # 等待键盘敲击
cv.destroyAllWindows()
# k = cv.waitKey(0)
# if k == 27:         # 等待ESC退出
#     cv.destroyAllWindows()
# elif k == ord('s'):  # 等待关键字，保存和退出
#     cv.imwrite('messigray.png', img)
#     cv.destroyAllWindows()
